<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ChatWaEditor</title>
    <script>
      (function(){
        try{
          var mode = localStorage.getItem('colorTheme');
          var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
          var isDark = (mode === 'dark') || (mode === 'system' && prefersDark);
          document.documentElement.classList.toggle('dark', !!isDark);
        }catch(e){}
      })();
    </script>
  </head>

  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>
